import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('counter', () => {
  const User = ref(null)
  
  const login = (user:any) => {
    User.value = user
  }
  const isLogin = () => {
    
    
    return User.value !== null
  }
  const logout = () => {
    User.value = null
  }
  const getUser: any = () => {
    return User
  }

  return { login, isLogin, logout ,getUser }
})
